using DimensionsHelper.LanguageService.Syntax;

namespace DimensionsHelper.LanguageService;

public class AnalysisLabel : AnalysisDeclaration
{
    internal AnalysisLabel(LabelDeclaration labelDeclaration, AnalysisNode? parent) : base(AnalysisBoundKinds.Label,
        labelDeclaration, parent)
    {
        Syntax = labelDeclaration;
    }

    public override LabelDeclaration Syntax { get; }
}


public static partial class AnalysisNodeFactory
{
    /// <summary>
    /// 创建一个行标签
    /// </summary>
    /// <param name="labelDeclaration">原始语法节点</param>
    /// <param name="parent">父节点，可以忽略</param>
    public static AnalysisLabel Label(LabelDeclaration labelDeclaration, AnalysisNode? parent)
    {
        return new AnalysisLabel(labelDeclaration, parent);
    }
}